//
// BlockingStream.hpp for BlockingStream in /home/mambou_j//babel-2014
// 
// Made by jacquesquentin mamboumouafo
// Login   <mambou_j@epitech.net>
// 
// Started on  Fri May 11 00:15:04 2012 jacquesquentin mamboumouafo
// Last update Wed May 16 16:54:34 2012 jacquesquentin mamboumouafo
//


#ifndef	__BLOCKINGSTREAM_HPP__
#define	__BLOCKINGSTREAM_HPP__

namespace	portaudio
{

  /////
  /// @brief Stream class for blocking read/write-style input and output.
  //////
  class	BlockingStream	:	public Stream
  {
  public:
    BlockingStream();
    BlockingStream(const StreamParameters &parameters);
    ~BlockingStream();

    void	open(const StreamParameters &parameters);

    void	read(void *buffer, unsigned long numFrames);
    void	write(const void *buffer, unsigned long numFrames);

    signed	long	availableReadSize() const;
    signed	long	availableWriteSize() const;

  private:
    BlockingStream(const BlockingStream &); // non-copyable
    BlockStream &operator=(const BlockingStream &); // non-copyable
  };
}

#endif
